<template>
	<view class="content">
		<view class="list" v-for="(el,ind) in listlm" @click="nato(ind,el.url)">
			{{el.name}}
		</view>
	</view>
</template>    

<script>
	import JSEncrypt from 'jsencrypt/bin/jsencrypt'; //加密
	export default {
		data() {
			return {
				title: '组件库',
				listlm: [{
					name: '列表'
				}, {
					name: '海报'
				}, {
					name: '上传'
				}, {
					name: '时间'
				}, {
					name: '个人中心'
				}, {
					name: '上下滑动'
				}, {
					name: '导航'
				}, {
					name: '评论'
				}]
			}
		},
		onLoad(options) {

		},
		onReady() {
			var crypt = new JSEncrypt({
				default_key_size: 1024
			});
			var tmps = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCOi4cBeDcuNpTjzPx6sgr163PACKH6T2IRfDgiFKeMyQOe8NriGqP+in1j9WGq8CghV8G0rX7yuIM6W/kjR+AqLh0Y44V2EIR1mtsrim6atzwEkvMvlPB6Emi8GJh8ACMCCISP2WnH4XpN1XjFsBdy2TT5b+MXUGfiB6dq4OA+pwIDAQAB'
			crypt.setPublicKey(tmps);
			var mimastr = crypt.encrypt('huahua@2020');
			console.log(mimastr);
		},
		methods: {
			nato(ind, url) {
				uni.navigateTo({
					url: '/pages/index/zileixing?ind=' + ind
				})
			}
		}
	}
</script>

<style>
	.list {
		width: 690rpx;
		height: 80rpx;
		line-height: 80rpx;
		border-radius: 10rpx;
		border: 1rpx solid #ccc;
		text-align: center;
		margin-bottom: 10rpx;
	}

	.content {
		padding: 20rpx 0;
	}
</style>
